import numpy as np
import platgo as pg

class TournamentSelection:
    """
    P = TournamentSelection(K,N,fitness1,fitness2,...) returns the indices
    of N solutions by K-tournament selection based on their fitness values.
    In each selection, the candidate having the MINIMUM fitness1 value will
    be selected; if more than one candidates have the same minimum value of
    fitness1, then compare their fitness2 values, and so on.
    """
    pass